//
//  InterfaceDefineClass.m
//  PocketWenzhou3
//
//  Created by carlos on 13-5-10.
//  Copyright (c) 2013年 carlosk. All rights reserved.
//

#import "InterfaceDefineClass.h"

@implementation InterfaceDefineClass
static NSString *base_url = @"";
#define k_param_base_url @"k_param_v2_base_url"
//获取主url
+(NSString *)getBaseUrl
{
    //从本地读
    if (!base_url || [@"" isEqualToString:base_url]) {
        base_url = [[NSUserDefaults standardUserDefaults] valueForKey:k_param_base_url];
        if (!base_url || [@"" isEqualToString:base_url]) {
            base_url = @"http://110.76.47.76:801/pocketwz/index.php/";
            [[NSUserDefaults standardUserDefaults] setValue:base_url forKey:k_param_base_url];
            [[NSUserDefaults standardUserDefaults] synchronize];
        }
    }

    return base_url;
}

//设置主url
+(void)setBaseUrl:(NSString *)mBaseUrl
{
    base_url = mBaseUrl;
    [[NSUserDefaults standardUserDefaults] setValue:base_url forKey:k_param_base_url];
    [[NSUserDefaults standardUserDefaults] synchronize];
}
@end
